package cn.swenty.backstage.framework.util;

import org.apache.shiro.crypto.hash.SimpleHash;
import org.apache.shiro.util.ByteSource;

public class PasswordHelper {
    
	private static final String ALGORITHM_NAME  = "MD5";
	
	public static final String CREDENTIALS_SALT = ""; 
	
	public static String encryptPassword(String password){
		
		 return new SimpleHash(
				 ALGORITHM_NAME,
	                password,
	                ByteSource.Util.bytes(CREDENTIALS_SALT)).toHex();
		
	}
	
}
